# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  traceAllExceptions: true
  path: /var/log/mongod/mongod.log

# Where and how to store data.
storage:
  dbPath: "{{ data_dir }}"
  journal:
    enabled: true
  engine: wiredTiger
  syncPeriodSecs: 60
  wiredTiger:
    engineConfig:
      cacheSizeGB: 6

#  mmapv1:

# how the process runs
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile

# network interfaces
net:
  maxIncomingConnections: 65536
  wireObjectCheck: true
  ipv6: false
  port: 27017
  bindIp: 127.0.0.1,{{ ansible_default_ipv4.address }}   # Listen to local interface only, comment to listen on all interfaces.

security:
  authorization: enabled
  clusterAuthMode: keyFile
  keyFile: {{ home_dir }}/keyFile
  javascriptEnabled: true

setParameter:
  enableLocalhostAuthBypass: true
  authenticationMechanisms: SCRAM-SHA-1
  connPoolMaxShardedConnsPerHost: 200
  connPoolMaxConnsPerHost: 200
  notablescan: 0

operationProfiling:
  slowOpThresholdMs: 100

#replication:
#  oplogSizeMB: 64
#  replSetName: "rs0"
#  secondaryIndexPrefetch: "all"

#sharding:

## Enterprise-Only Options

#auditLog:
